function makeLargestSpecial(s: string): string {
    let left: number = 0
    let count: number = 0
    let sArr: string[] = []
    if(s.length <= 2) {
        return s
    }
    s.split('').forEach((item,index) => {
        // console.log(item,typeof item)
        if(item === '1'){
            count++
            console.log(index,count)
        }else {
            count--
            console.log(count)
            if(count === 0){
                sArr.push("1" + makeLargestSpecial(s.substring(left + 1, index)) + '0');
                left = index+1
            }
        }
    })
    sArr.sort().reverse()
    console.log(sArr.sort().reverse())
    return sArr.join('')
};

const s: string = "11011000"
console.log(makeLargestSpecial(s))